package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func commonSuccess(c *gin.Context, message string, data any) {
	c.JSON(http.StatusOK, gin.H{
		"message": message,
		"code":    "200",
		"data":    data,
	})
}

func commonFailed(c *gin.Context, message string, data any) {
	c.JSON(http.StatusOK, gin.H{
		"message": message,
		"code":    "500",
		"data":    data,
	})
}
